function YMD = serial2YMD(SD)
%serial2YMD - Serial to YYMMMDD date conversion
%
%       YMD = serial2YMD(SD)
%
% Let SD be a date vector in MATLAB serial date format. This function 
% provides the corresponding char array of dates in the YYMMMDD format
% (e.g., 732314, which corresponds to 2-Jan-2005, is converted into 
% 05JAN02).
% Please note that the size of the output array is lenght(SD)-by-7 also 
% in the case in which SD is a row vector.  
%
% See also date2gpsw, gpsw2serial, frac2serial, serial2frac, frac2MJD, 
% MJD2frac, YMD2serial, leapy.

% G. Teza, 2021

YMD = upper(datestr(SD(:),'yymmmdd'));